@use "@src/theme/palette";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  //user-select: none
  -webkit-tap-highlight-color: transparent;
}

ul {
  li {
    list-style: none;
  }
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  object-fit: cover;
}

.App {
  width: 100vw;
  height: 100vh;
}

:root {
  --background-color-white: var(--white);
  --background-color--gray: var(--gray-10);
  --border-color: var(--gray-80);
  --text-color: var(--gray-100);
  --text-color-white: var(--white);
  --text-color-gray: var(--gray-60);
  --text-color-hover: var(--gray-10-hover);
  --shadow-color: var(--gray-30);
  --search-input-color: var(--gray-10);
  --bottom-navigation-bar-color: var(--gray-50);
  --bottom-navigation-bar-select-color: var(--cobalt-40);
}

.dark {
  --border-color: var(--gray-10);
}


svg {
  height: 100%;
  //width: 100%;

  path {
    fill: currentColor !important;
  }

  transition: 0.2s;

  &:active {
    color: var(--text-color-hover);
  }
}

.centered {
  display: flex;
  justify-content: center;
  align-items: center;
}

.userHead {
  height: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0.25rem 0.625rem -0.3rem var(--shadow-color);
}

@for $i from 1 through 5 {
  .text-overflow-#{$i} {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $i;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.card {
  padding: 1rem;
  width: 95%;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}


.z-button {
  width: 100%;
  height: 2.5rem;
  background-color: var(--cobalt-50);
  color: var(--white);
  border-radius: 0.3rem;
  border: none;
  transition: 0.2s;
  cursor: pointer;


  &:active {
    background-color: var(--cobalt-40);
  }
}

.z-button-success {
  background-color: var(--conifer-50);

  &:active {
    background-color: var(--conifer-40);
  }
}

.z-button-warning {
  background-color: var(--gold-50);

  &:active {
    background-color: var(--gold-40);
  }
}

.z-button-danger {
  background-color: var(--red-50);

  &:active {
    background-color: var(--red-40);
  }
}

.z-button-info {
  background-color: var(--gray-50);

  &:active {
    background-color: var(--gray-40);
  }
}


.message-input {
  @extend .centered;
  padding: 0.2rem 0.5rem;
  justify-content: space-around;
  background-color: var(--background-color--gray);

  > .inputIcon {
    flex: 1;
  }

  .z-button {
    width: 20%;
    margin-left: 0.5rem;
  }
}

//聊天记录样式
.record {
  flex: 1;
  overflow: auto;

  > li {

    > p {
      text-align: center;
      color: var(--text-color-gray);
    }

    > div {
      padding: 1rem;
      display: flex;
      align-items: self-start;


      > div:nth-child(1) {
        img {
          height: 3rem;
        }
      }

      .record-content {
        display: inline-block;
        margin: 0 1rem;
        padding: 0.8rem;
        border-radius: 0.5rem;
        background-color: var(--background-color--gray);
        box-shadow: 0 0.25rem 0.625rem -0.3rem var(--shadow-color);
      }

      .name {
        margin: 0 1rem 0.5rem;
        font-size: 0.8rem;
        color: var(--text-color-gray);
      }
    }
  }

  .my-li {
    flex-direction: row-reverse;

    .name {
      text-align: right;
    }

    .record-content {
      float: right;
    }

  }
}


//碟片
.record-player {
  position: relative;
  width: 50%;
  padding-top: 5%;
  overflow: hidden;

  .pole {
    position: absolute;
    top: 0;
    right: 11%;
    background-image: url("@src/assets/pole.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 1;
    width: 50%;
    z-index: 1;
    transition: 0.5s ease-in-out;
    transform-origin: 50% 16%;
  }
}

.picUrl {
  height: 65%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;


  > img {
    height: 100%;
    width: 100%;
  }
}

//头部
.head {
  padding: 0.5rem 1rem;
  justify-content: space-between;
  text-align: center;
  box-shadow: rgba(0, 0, 0, 0.08) 0 4px 12px;

  .name {
    span {
      color: var(--text-color-gray);
      margin-left: 1rem;
      font-size: 0.8rem;
    }
  }


  svg {
    cursor: pointer;
    width: 0.8rem;
    color: var(--text-color-gray);
    filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.16));
  }
}

// 控制器
.controller {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 30%;
  margin: 0 auto;
  height: 6cqw;
  z-index: 1;

  > div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 6cqw;
    height: 6cqw;
    aspect-ratio: 1;
  }

  svg {
    width: 100%;
    height: 100%;
    cursor: pointer;
  }

  > div:nth-child(2) {
    .play-btn {
      height: 100%;
    }
  }
}
